<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
    <meta charset="utf-8">
    <link rel="shortcut icon" href="../../img/favicon.ico">
    <title>用户授权</title>
    <script type="text/javascript" src="../../../webjars/fw-web/main/common/vue-boot.js"></script>
    <style type="text/css">
        .el-dialog__body {
            padding: 10px 20px;
        }
        .el-main {
            padding: 0;
        }
        .el-collapse-item__header {
            height: 38px;
            line-height: 38px;
        }
        .el-collapse-item__arrow {
            line-height: 38px;
            font-weight: 400;
        }
        .el-collapse-item__wrap {
            padding-left: 20px;
        }
        .el-collapse-item__content {
            padding-bottom: 10px;
            font-size: 13px;
            color: #303133;
        }
    </style>
</head>
<body>
<div id="app">
    <template>
<!--        <el-row v-cloak>-->
<!--            <el-collapse v-model="activeNames">-->
<!--                <el-collapse-item title="友情提醒" name="1">-->
<!--                    <li>本功能用于管理员维护其他用户权限，普通用户无操作功能；</li>-->
<!--                    <li>本功能使用前需先完善本机构角色及对应菜单权限；</li>-->
<!--                    <li>选择指定用户及角色，点击授权即完成菜单分配，该用户重新登录即可看到对应权限。</li>-->
<!--                </el-collapse-item>-->
<!--            </el-collapse>-->
<!--        </el-row>-->
        <el-row :gutter="10">
            <el-col :span="14">
                <el-form :inline="true" ref="paramData" :model="paramData" size="small" @submit.native.prevent>
                    <el-form-item label="登录名">
                        <el-input v-model="paramData.account" clearable style="width: 100px;"></el-input>
                    </el-form-item>
                    <el-form-item label="手机号">
                        <el-input v-model="paramData.phone" clearable style="width: 130px;"></el-input>
                    </el-form-item>
                    <el-form-item label="用户名">
                        <el-input v-model="paramData.username" clearable style="width: 110px;"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" icon="el-icon-search" @click="onSearch">查询</el-button>
                    </el-form-item>
                </el-form>
            </el-col>
            <el-col :span="10">
                <el-button type="primary" icon="el-icon-check" @click="save" size="small">授权</el-button>
            </el-col>
        </el-row>
        <el-row :gutter="10">
            <el-col :span="14">
                <el-table v-loading="loading" @row-click="userSelect" :data="tableData" style="width: 100%" highlight-current-row
                          row-class-name="row_padding" header-row-class-name="head_padding" border>
                    <el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
                    <el-table-column label="登录名" prop="account" width="140" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column label="手机号" prop="phone" width="140" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column label="用户名称" prop="username" header-align="center" show-overflow-tooltip></el-table-column>
                </el-table>
                <div style="text-align: right;margin-top: 8px;">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="paramData.currentPage"
                            :page-sizes="[5,10, 20, 50, 100]"
                            :page-size="paramData.pageSize"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="paramData.total">
                    </el-pagination>
                </div>
            </el-col>
            <el-col :span="10">
                <el-table v-loading="loadingRole" ref="roleTable" @selection-change="handleSelectionChange"
                          row-key="roleCode"
                          :data="tableDataRole" style="width: 100%" highlight-current-row
                          row-class-name="row_padding" header-row-class-name="head_padding" border>
                    <el-table-column type="selection" width="55" align="center"></el-table-column>
                    <el-table-column label="角色名称" prop="name" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column label="角色类型" prop="type" width="120" align="center" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <span v-text="roleTypeRender(scope.row.roleType)"></span>
                        </template>
                    </el-table-column>
                </el-table>
            </el-col>
        </el-row>
    </template>
</div>
</body>
<script src="./userrole.js" type="text/javascript"></script>
</html>

